<%@ page language="java" import="java.util.*,com.wit.service.impl.*,com.wit.po.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<% 
  List list=(List)request.getAttribute("RList");
  int CPage=(Integer)request.getAttribute("CurPage");
  int TPage=(Integer)request.getAttribute("TotalPage");
  int TRows=(Integer)request.getAttribute("TotalRows");
%>
<% 
DepartmentserviceImp deimp=new DepartmentserviceImp();
List<Department> dlist=deimp.DepartmentList();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
   <link href="<%=basePath%>/style/main.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="<%=basePath%>/style/style.css" />

<script>

 function changeV(objID)
			{
				if(document.getElementById("tbody_"+objID).style.display == "block")
				{
					
					document.getElementById("img_"+objID).src = "<%=basePath%>/images/ico_have2.gif";
					document.getElementById("tbody_"+objID).style.display = "none"
				}
				else
				{
					document.getElementById("img_"+objID).src = "<%=basePath%>/images/ico_nohave2.gif";
					document.getElementById("tbody_"+objID).style.display = "block"
				}
			}
			function Serachfunction()
			{
		    document.SearchPagerForm.submit();
			}
			function SearchFormClear()
			{
			document.getElementById("SearchPagerForm").reset();
			}
			
			function ChoicePage()
			{
			document.PagerMethodForm.action = 'ChoosePagerAction';
			document.PagerMethodForm.submit();
			}
			function FirstPage()
			{
			document.PagerMethodForm.action = 'FirstPagerAction';
			document.PagerMethodForm.submit();
			}
			function UpPage()
			{
			document.PagerMethodForm.action = 'UpPagerAction';
			document.PagerMethodForm.submit();
			}
			function DownPage()
			{
			document.PagerMethodForm.action = 'DownPagerAction';
			document.PagerMethodForm.submit();
			}
			function LastPage()
			{
			document.PagerMethodForm.action = 'LastPagerAction';
			document.PagerMethodForm.submit();
			}
			
			
</script>

  </head>
  
  <body>
   <table width="1200" cellpadding="0" cellspacing="0" class="table">
  <tr>
    <td>
      <table width="100%"  cellpadding="0" cellspacing="0" class="table2">
        <tr>
          <td valign="top">
            <table width="100%" class="top" cellpadding="0" cellspacing="0">
              <tr>
                <td>当前位置:&nbsp;人事管理&nbsp;>>&nbsp;员工管理</td>
              </tr>
            </table>
			<div id="mainareacontent">
        <div class="mainarea">
            <div class="search">			
			 <form action="SearchEmployeeAction" method="post" id="SearchPagerForm" name="SearchPagerForm">
                <table width="100%" cellpadding="0" cellspacing="0" >
                    <tr>
                        <td class="ico">
                            <a href="javascript:changeV(1)">
                                <img  src="<%=basePath%>/images/ico_have2.gif" id="img_1" border="0"></a>                        </td>
                      <td ><table cellpadding="0" cellspacing="0" width="100%" >
                        <tr>
                          <th width="7%"> 员工编号： </th>
                          <td width="34%"><input name="employeeId" type="text" id="employeeId"/>                          </td>
                          <th width="8%"> 员工名称： </th>
                          <td width="23%"><input name="employeeNameC" type="text" id="employeeNameC"/></td>
                          <td width="28%" align="left" ><img onClick="Serachfunction()" src="<%=basePath%>/images/btn_search.gif" />&nbsp;<img onClick="SearchFormClear()" src="<%=basePath%>/images/btn_reset.gif" /> </td>
                        </tr>
                        <tbody id="tbody_1" style="display: none; border: 0px;">
                          <tr>
                            <th height="19"> 员工职位：</th>
                            <td>
                            <select name="employeepositionId" id="employeepositionId" >
                                 <option value="">--请选择--</option>
								 <option value="LCGW">理财顾问</option>
								 <option value="LCZR">理财主任</option>
								 <option value="XXJL">行销经理</option>
								 <option value="GJXXJL">高级行销经理</option>
								 <option value="LCJL">理财经理</option>
								 <option value="QYJL">区域经理</option>
							</select>
                            </td>
                            <th>手 &nbsp;&nbsp;&nbsp;机：</th>
                            <td><input name="employeePh" type="text" id="employeePh" /></td>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <th> 所属公司： </th>
                            <td>
                            <select name="CompanyName" id="CompanyName">
                                <option value="">--请选择--</option>
                                <option>--1--</option>
                                <option>--2--</option>
                                <option>--3--</option>
                                <option>--4--</option>
                                <option>--5--</option>
                            </select>
                            </td>
                            <th>员工电话：</th>
                            <td><input name="employeeTel" type="text" id="employeeTel" /></td>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <th> 部&nbsp;&nbsp;&nbsp;&nbsp;门： </th>
                            <td>
                            
                             <select name="departmentId" id="departmentId">
                              <option value="">--请选择--</option>
				                  <%
				                    for(int i=0;i<dlist.size();i++)
				                    { 
				                    Department dep=dlist.get(i);  
				                  %>
				                    <option value="<%=dep.getDepartmentId() %>" ><%=dep.getDepartNameC()%></option>
				 
				                  <%
				                  }
				                  %>
                 			 </select>
                            </td>
                            <th>身份证号：</th>
                            <td><input name="employeeIdcard" type="text" id="employeeIdcard" /></td>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <th>就职状态： </th>
                            <td>
                            <select name="employeeStatus" >
                             <option value="">--请选择--</option>
                              <option value="在职">在职</option>
							  <option value="离职">离职</option>
                             </select>
                             </td>
                            <th>学 &nbsp;&nbsp;&nbsp;历：</th>
                            <td>
                            <select name="employeeEdu" id="employeeEdu" >
                                 <option value="">--请选择--</option>
                                  <option value="小学">小学</option>
								 <option value="本科">本科</option>
								 <option value="专科">专科</option>
								 <option value="高中">高中</option>
								 <option value="初中">初中</option>
								 <option value="硕士">硕士</option>
								 <option value="博士">博士</option>
								 <option value="博士后">博士后</option>
							</select>
							</td>
                            <td>&nbsp;</td>
                          </tr>
                        </tbody>
                      </table></td>
                    </tr>
                </table>
                </form>
            </div>
                    <table width="100%" cellpadding="0" cellspacing="1" class="dg_borderstyle">
                      <thead>
                        <tr>
                          <th width="99">员工编号</th>
                          <th width="69">员工名称</th>
                          <th width="149">身份证号</th>
                          <th width="68">员工职位</th>
                          <th width="64">部门</th>
                          <th width="100">手机</th>
                          <th width="101">电话</th>
                          <th width="64">学历</th>
                          <th width="76">入司时间</th>
                          <th width="76">就职状态</th>
                          <th width="76">家庭住址</th>
                        </tr>
                      </thead>
                      <tbody >
                      <%
                     for(int i=0;i<list.size();i++)
                     {
                      Employee emp=(Employee)list.get(i); 
                      %>
                        <tr>
                          <td   ><a  href="<%=basePath%>/Personnel/Personnel_StaffBasic.jsp?employeeId=<%=emp.getEmployeeId() %>" target="_self"><%=emp.getEmployeeId()%></a> </td>
                          <td   ><%=emp.getEmployeeNameC()%> </td>
                          <td   ><%=emp.getEmployeeIdcard()%></td>
                          <td ><%=emp.getEmployeeposition().getPositionName()%></td>
                          <td ><%=emp.getDepartment().getDepartNameC()%></td>
                          <td ><%=emp.getEmployeePc() %></td>
                          <td ><%=emp.getEmployeeTel() %></td>
                          <td ><%=emp.getEmployeeEdu() %></td>
                          <td ><%=emp.getEnterDate().toString().substring(0,10) %></td>
                          <td ><%=emp.getEmployeeStatu() %></td>
                          <td ><%=emp.getEmployeeAddress() %></td>
                        </tr>
                     <%} %>
                       
                      </tbody>
                    </table>
                    <form action="test" method="post"  id="PagerMethodForm" name="PagerMethodForm">
                    <table width="100%" cellpadding="0" cellspacing="0" class="dg_pagestyle">
                <tr>
                    <td class="pageinfo">
                        第<%=CPage %>页 | 共<%=TPage%>页/<%=TRows %>条记录                 <input type="hidden" id="pageNo" value="<%=CPage%>" name="pageNo">   </td>
                    <td class="pagebutton">
                        每页
                        <select id="PageSize" name="pageSize">
                            <option value="5" selected="selected">5</option>
                            <option value="10">10</option>
                            <option value="20">20</option>
                            <option value="50">50</option>
                            <option value="1000">全部</option>
                        </select>
                        条记录 | 第
                        <input id="ChoiceCpage" type="text" value="1" style="width: 20px;" name="ChoiceCpage"/>
                        页                                    <img onClick="ChoicePage()" src="<%=basePath%>/images/btn_go.gif">
                        <img onClick="FirstPage()" src="<%=basePath%>/images/btn_sy.gif">
                        <img onClick="UpPage()"  src="<%=basePath%>/images/btn_syy.gif">
                        <img onClick="DownPage()"  src="<%=basePath%>/images/btn_xyy.gif">
                        <img onClick="LastPage()"  src="<%=basePath%>/images/btn_wy.gif">                    </td>
                </tr>
            </table>
            </form>
        </div>
      </div>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
  </body>
</html>
